﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.ServiceModel;

namespace PositionServer.Service
{
    [ServiceContract]
    public interface IPositionService
    {
        /// <summary>
        /// return 1 means succeed 87
        /// </summary>
        /// <returns></returns> 
        [OperationContract]
        int TestWCF();


        [OperationContract]
        DataSet GetListOfTeacher(string strWhere);



        [OperationContract]
        string GetClientVersion();

        [OperationContract]
        Model.UserInfo CheckUserWithReturn(string userName, string password);

        [OperationContract]
        List<Model.PersonInfo> GetAllTaxiInfosByCompanyName(string companyName);
        /// <summary>
        /// return nearby TaxiInfo 
        /// </summary>
        /// <param name="longitude"></param>
        /// <param name="latitude"></param>
        /// <param name="distance"> kilometer</param>
        /// <param name="type">0---Taxi,1---PhoneUser</param>
        /// <returns></returns>
        [OperationContract]
        List<Model.PersonInfo> GetNearbyGps(double longitude, double latitude, double distance, int type);

        /// <summary>
        /// Verify client platform user name and password 
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns>true/false</returns>
        [OperationContract]
        bool CheckUser(string userName, string password);

        [OperationContract]
        bool ChangePassWordByUserName(string userName, string newPwd);

         

        [OperationContract]
        bool UserAdd(Model.UserInfo model);

        [OperationContract]
        bool UserUpdate(Model.UserInfo model);

        [OperationContract]
        bool UserDelete(int id);

        [OperationContract]
        bool UserDeleteList(string idlist);

        [OperationContract]
        DataSet UserGetList(string strWhere);

        [OperationContract]
        bool UserExist(string userName);



        [OperationContract]
        bool RoleAdd(Model.RoleInfo model);

        [OperationContract]
        bool RoleUpdate(int id, string name, string permission, string remark);

        [OperationContract]
        string[] GetRoleInfoByUserName(string username);

        [OperationContract]
        bool RoleDelete(int id);

        [OperationContract]
        bool RoleDeleteList(string idlist);

        [OperationContract]
        DataSet RoleGetList(string strWhere);

        [OperationContract]
        bool RoleExist(string roleName);


 

      

        [OperationContract]
        bool TaxiAdDelete(int id);

        [OperationContract]
        bool TaxiAdDeletebyTaxiIdAdId(int taxiId, int adid);

        [OperationContract]
        bool TaxiAdDeleteList(string idlist);

        [OperationContract]
        DataSet TaxiAdGetList(string strWhere);

        [OperationContract]
        bool TaxiAdExist(int taxiId, int adId);


        [OperationContract]
        DataSet TaxiGpsHistoryGetList(string driverPhoneNumber, DateTime startTime, DateTime endTime);

        [OperationContract]
        DataSet TaxiGpsHistoryGetListWhere(string strWhere);


        [OperationContract]
        int TaxiGpsHistoryGetRecordCount(string strWhere);

        [OperationContract]
        DataSet GetTaxiOnlineCountReport(string strWhere);

        [OperationContract]
        DataSet TaxiGpsHistoryGetStatisticsList(string strWhere);

       
       



        [OperationContract]
        bool TaxiAreaExit(int taxiid);

        [OperationContract]
        bool TaxiAreaAdd(Model.TaxiAreaInfo model);

        [OperationContract]
        bool TaxiAreaUpdate(Model.TaxiAreaInfo model);

        [OperationContract]
        bool TaxiAreaDelete(int taxiid);

        [OperationContract]
        DataSet TaxiAreaGetList(string strWhere);

        [OperationContract]
        bool GmapoverlayAdd(Model.GmapoverlayInfo model);

        [OperationContract]
        bool GmapoverlayUpdate(Model.GmapoverlayInfo model);

        [OperationContract]
        bool GmapoverlayDelete(int id);

        [OperationContract]
        Model.GmapoverlayInfo GmapoverlayGetModel(int id);

        [OperationContract]
        DataSet GmapoverlayGetList(string strWhere);

        [OperationContract]
        DataSet GmapoverlayGetListByParameter(string parameter, string parameterVaule);

        [OperationContract]
        int GmapoverlayGetRecordCount(string strWhere);

        [OperationContract]
        bool ParentExists(string phoneNumber);

        [OperationContract]
        bool ParentAdd(Model.ParentInfo model);

        [OperationContract]
        bool ParentUpdate(Model.ParentInfo model);

        [OperationContract]
        bool ParentDelete(int id);

        [OperationContract]
        Model.ParentInfo ParentGetModel(int id);

        [OperationContract]
        DataSet ParentGetList(string strWhere);
 
 

        [OperationContract]
        bool CompanyExists(string companyName);

        [OperationContract]
        bool CompanyAdd(Model.CompanyInfo model);

        [OperationContract]
        bool CompanyUpdate(Model.CompanyInfo model);

        [OperationContract]
        bool CompanyDelete(int id);

        [OperationContract]
        Model.CompanyInfo CompanyGetModel(int id);

        [OperationContract]
        DataSet CompanyGetList(string strWhere);



         
        //------------------------------------------ForTest-------------------------------------------

        /// <summary>
        /// Add Trade successful  Info
        /// </summary>
        /// <param name="taxiGpsHistoryInfo"></param>
        [OperationContract]
        void AddTaxiGpsHistoryInfo(Model.TaxiGpsHistoryInfo taxiGpsHistoryInfo);

        //------------------------------------------------------------------------------------------------
    }
}
